<template>
	<div>
		<el-form ref="form" :model="form" label-width="150px" class="add-club" v-if="showPage==2">
			<el-form-item label="月子会所名称">
			    <el-input v-model="form.name" style="width: 300px;"></el-input>
			</el-form-item>
			<el-form-item label="月子会所广告页面" class="advertisement">
			    <el-upload
			    	action="https://fcw.fcw-china.com:8443/electronic/contract/UploadPic" 
			    	:on-success="function(response,file){return handleSuccess(response,file,'release')}"
			    	:before-upload="handleBefore"
			    	list-type="picture-card" :limit="1"
			    	:on-preview="handlePictureCardPreview"
			    	:on-remove="function(file){return handleRemove(file,'release')}" 
			    	:file-list="form.bannerList">
			    	<i class="el-icon-plus"></i>
			    </el-upload>
			</el-form-item>
			<el-form-item label="月子会所文案介绍">
			    <el-input type="textarea" v-model="form.desc" style="height: 130px;" class="desc"></el-input>
			</el-form-item>
			<el-form-item label="月子会所环境照片">
			    <el-upload
					action="https://fcw.fcw-china.com:8443/electronic/contract/UploadPic" 
					:on-success="function(response,file){return handleSuccess(response,file,'release')}"
			    	:before-upload="handleBefore"
			    	list-type="picture-card" :limit="9"
			    	:on-preview="handlePictureCardPreview"
			    	:on-remove="function(file){return handleRemove(file,'release')}" 
			    	:file-list="form.environmentalPhotos">
					<i class="el-icon-plus"></i>
			    </el-upload>
			</el-form-item>
			<el-form-item align="center" style="width: 470px;margin-top: 50px;">
				<el-button type="primary" size="small" style="width: 100px;" @click="$emit('update:showPage',1)">取消</el-button>
				<el-button size="small" style="width: 100px;">确定</el-button>
			</el-form-item>
		</el-form>
	</div>
	
</template>

<script>
export default{
	props:{
		options:{
			type: Object,
			require: true
		},
		showPage: {
			type: Number,
			require: true
		}
	},
	data() {
		return {
			form: {
				name: '',									//月子会所名称
				bannerList:[],								//月子会所广告
				desc: '',									//月子会所文案介绍
				environmentalPhotos:[],						//月子会所环境照片
			}
		}
	},
	methods: {
		handleBefore(){
			
		},
		handleSuccess(){
			
		},
		handleRemove(){
			
		},
		handlePictureCardPreview(file){
			
		},
		onSubmit() {
			console.log('submit!');
		}
	}
}
</script>

<style scoped="scoped">
.add-club{
	width: 1200px;margin: 40px auto;
}
.desc{
	width: 400px;min-height: 130px;max-height: 130px;
}
</style>
